package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 水费账单对象 water_bill
 *
 * @author ruoyi
 * @date 2025-09-24
 */
public class WaterBill extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 账单编号 */
    private String billNumber;

    /** 户号 */
    @Excel(name = "户号")
    private String userId;

    private String phone;

    /** 户名 */
    @Excel(name = "户名")
    private String userName;

    /** 用水地址 */
    @Excel(name = "用水地址")
    private String address;

    /** 上次抄码 */
    @Excel(name = "上次抄码")
    private String meterReadLast;

    /** 本次抄码 */
    @Excel(name = "本次抄码")
    private String meterReadNow;

    /** 本次水量(m³) */
    @Excel(name = "本次水量(m³)")
    private Double usageAmount;

    /** 单价 */
    @Excel(name = "单价")
    private BigDecimal unitPrice;

    /** 水费金额(元) */
    @Excel(name = "水费金额(元)")
    private Double totalAmount;

    /** 通知单日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "通知单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date adviceDate;

    /** 表号 */
    private String meterNo;

    /** 账单日期 */
    private Date billingDate;

    /** 月份 */
    private String month;

    /** 计费周期开始 */
    private Date billingCycleStart;

    /** 计费周期结束 */
    private Date billingCycleEnd;

    /** 应付金额 */
    private BigDecimal amountDue;

    /** 已付金额 */
    private BigDecimal paidAmount;

    /** 状态：1-未支付，2-部分支付，3-已支付，4-逾期 */
    private Integer billStatus;

    /** 逾期天数 */
    private int dueDate;

    /** 支付日期 */
    private Date paymentDate;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setBillNumber(String billNumber)
    {
        this.billNumber = billNumber;
    }

    public String getBillNumber()
    {
        return billNumber;
    }
    public void setUserId(String userId)
    {
        this.userId = userId;
    }

    public String getUserId()
    {
        return userId;
    }
    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getUserName()
    {
        return userName;
    }
    public void setAddress(String address)
    {
        this.address = address;
    }

    public String getAddress()
    {
        return address;
    }
    public void setMeterReadLast(String meterReadLast)
    {
        this.meterReadLast = meterReadLast;
    }

    public String getMeterReadLast()
    {
        return meterReadLast;
    }
    public void setMeterReadNow(String meterReadNow)
    {
        this.meterReadNow = meterReadNow;
    }

    public String getMeterReadNow()
    {
        return meterReadNow;
    }

    public Double getUsageAmount() {
        return usageAmount;
    }

    public void setUsageAmount(Double usageAmount) {
        this.usageAmount = usageAmount;
    }

    public void setUnitPrice(BigDecimal unitPrice)
    {
        this.unitPrice = unitPrice;
    }

    public BigDecimal getUnitPrice()
    {
        return unitPrice;
    }

    public Double getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(Double totalAmount) {
        this.totalAmount = totalAmount;
    }

    public void setAdviceDate(Date adviceDate)
    {
        this.adviceDate = adviceDate;
    }

    public Date getAdviceDate()
    {
        return adviceDate;
    }
    public void setMeterNo(String meterNo)
    {
        this.meterNo = meterNo;
    }

    public String getMeterNo()
    {
        return meterNo;
    }
    public void setBillingDate(Date billingDate)
    {
        this.billingDate = billingDate;
    }

    public Date getBillingDate()
    {
        return billingDate;
    }
    public void setMonth(String month)
    {
        this.month = month;
    }

    public String getMonth()
    {
        return month;
    }
    public void setBillingCycleStart(Date billingCycleStart)
    {
        this.billingCycleStart = billingCycleStart;
    }

    public Date getBillingCycleStart()
    {
        return billingCycleStart;
    }
    public void setBillingCycleEnd(Date billingCycleEnd)
    {
        this.billingCycleEnd = billingCycleEnd;
    }

    public Date getBillingCycleEnd()
    {
        return billingCycleEnd;
    }
    public void setAmountDue(BigDecimal amountDue)
    {
        this.amountDue = amountDue;
    }

    public BigDecimal getAmountDue()
    {
        return amountDue;
    }
    public void setPaidAmount(BigDecimal paidAmount)
    {
        this.paidAmount = paidAmount;
    }

    public BigDecimal getPaidAmount()
    {
        return paidAmount;
    }
    public void setBillStatus(Integer billStatus)
    {
        this.billStatus = billStatus;
    }

    public Integer getBillStatus()
    {
        return billStatus;
    }
    public void setDueDate(int dueDate)
    {
        this.dueDate = dueDate;
    }

    public int getDueDate()
    {
        return dueDate;
    }
    public void setPaymentDate(Date paymentDate)
    {
        this.paymentDate = paymentDate;
    }

    public Date getPaymentDate()
    {
        return paymentDate;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("billNumber", getBillNumber())
                .append("userId", getUserId())
                .append("userName", getUserName())
                .append("address", getAddress())
                .append("meterReadLast", getMeterReadLast())
                .append("meterReadNow", getMeterReadNow())
                .append("usageAmount", getUsageAmount())
                .append("unitPrice", getUnitPrice())
                .append("totalAmount", getTotalAmount())
                .append("adviceDate", getAdviceDate())
                .append("remark", getRemark())
                .append("meterNo", getMeterNo())
                .append("billingDate", getBillingDate())
                .append("month", getMonth())
                .append("billingCycleStart", getBillingCycleStart())
                .append("billingCycleEnd", getBillingCycleEnd())
                .append("amountDue", getAmountDue())
                .append("paidAmount", getPaidAmount())
                .append("billStatus", getBillStatus())
                .append("dueDate", getDueDate())
                .append("paymentDate", getPaymentDate())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
